package br.edu.ufabc.lnc.peanho.view;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JMenu;
import javax.swing.JMenuBar;
import javax.swing.JMenuItem;

import br.edu.ufabc.lnc.peanho.presenter.MainCanvasPresenter;

@SuppressWarnings("serial")
public class MenuBar extends JMenuBar implements ActionListener{

	private MainCanvasPresenter presenter;
	
	public MenuBar(MainCanvasPresenter presenter) {
		this.presenter = presenter;
		JMenu file = new JMenu("Arquivo");
		JMenuItem start = new JMenuItem("Iniciar");
		start.addActionListener(this);
		file.add(start);
		add(file);
	}

	@Override
	public void actionPerformed(ActionEvent e) {
		presenter.startSimulation();
	}
	
}
